//============================================================================
// Copyright (C) 2003-2013 Brett R. Jones 
// All Rights Reserved
//
// You may redistribute and/or modify for non commercial and commercial uses 
// provided this copyright notice remains in place and is not modified
//
// This code is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
//
// brettjones1900@gmail.com
// http://www.p2panarchy.com
//============================================================================
#pragma once

#pragma pack(push) 
#pragma pack(1)

#ifndef ENT_VECTOR_DEFINE
class EntVector
{
	float af32[3];
};
#endif //ENT_VECTOR_DEFINE

// entity position and heading
class PktEntPosReq : public VxPktHdr, public EntVector
{
public:
	PktEntPosReq()
	{
		m_u16PktLen = sizeof( PktEntPosReq );
		m_u16PktType = PKT_TYPE_ENT_POS_REQ;
		u16Flags = 0;		// flags of entity state etc
		u64Sn = 0;			// serial number of entity
	}
	_inline EntVector * GetEntVector( void ){ return (EntVector *)this; }

	//=== vars ===//
	U16						u16Flags;		// flags of entity state etc
	U32						u64Sn;			// serial number of entity	
};


//============================================================================
class PktEntPosReply : public VxPktHdr, public EntVector
{
public:
	PktEntPosReply()
	{
		m_u16PktLen = sizeof( PktEntPosReply );
		m_u16PktType = PKT_TYPE_ENT_POS_REPLY;
		u16Flags = 0;		// flags of entity state etc
		u64Sn = 0;			// serial number of entity
	}
	_inline EntVector * GetEntVector( void ){ return (EntVector *)this; }

	//=== vars ===//
	U16						u16Flags;		// flags of entity state etc
	U32						u64Sn;			// serial number of entity
};
#pragma pack(pop)


